<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/6/19
  Time: 16:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>新增客户</title>
    <link rel="stylesheet" href="/static/files/addCustoms/styles.css" TYPE="text/css">
    <script  src="/static/js/jquery.min.js"></script>
    <script src="/static/files/addCustoms/data.js"></script>
    <script src="static/files/代理商管理/data.js"></script>
</head>
<body>

<div id="div0">

<%--=====主体=====--%>
<section id="sec-1">

    <div id="sec-1-div">

        <form method="post">

            <p class="sec-p">基本信息</p>
                <%--第一个表格--%>
                <table id="sec-tab-1">
                    <tr>
                        <td>企业名称:<input type="text" name="customname" id="customname"></td>
                        <td class="tab-1">企业类型:
                            <select name="customtypename" id="customtypename">
                                <option selected>-请选择-</option>
                                <c:forEach items="${customtype}" var="custom">
                                    <option value="${custom.configtypename}">${custom.configtypename}</option>
                                </c:forEach>
                            </select>
                        </td>
                        <%--代理人ID 不能为空--%>
                        <td><input type="hidden" name="agentid" id="agentid" value="1"></td>
                    </tr>
                    <tr>
                        <td>企业主页:<input type="text" name="siteurl" id="siteurl"></td>
                        <td class="tab-1">
                            状态:
                            <select name="customstatus" id="customstatus">
                                <option value="1" selected>启用</option>
                                <option value="0">禁用</option>
                            </select>
                        </td>
                    </tr>
            </table>

            <p class="sec-p">门户信息</p>
                <%--第二个表格--%>
                <table id="sec-tab-2">
                        <tr>
                            <td>法人代表:<input type="text" name="bossname" id="bossname"></td>
                            <td class="tab-2">注册日期:<input type="date" name ="regdatetime" id="regdatetime"></td>
                        </tr>
                        <tr>
                            <td>证件类型:
                                <select name="cardtypename" id="cardtypename">
                                    <option value="">-请选择-</option>
                                    <c:forEach items="${cardtype}" var="card">
                                        <option value="${card.configtypename}">${card.configtypename}</option>
                                    </c:forEach>
                                </select>
                            </td>
                            <td class="tab-2">证件号码:<input type="text" name="cardnum" id="cardnum"></td>
                        </tr>
                        <tr><td>国家:<input type="text" value="中国" name="country" id="country"></td>
                            <td class="tab-2">
                                省/地区:
                                <select name="province" id="province">
                                    <option value="">-请选择-</option>
                                    <c:forEach items="${hatProvinces}" var="p">
                                        <option value="${p.province}">${p.province}</option>
                                    </c:forEach>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>公司传真:<input type="text" name="companyfax" id="companyfax"></td>
                            <td class="tab-2">
                                城市:
                                <select name="city" id="city">
                                    <option value="">-请选择-</option>
                                    <c:forEach items="${hatCity}" var="c">
                                        <option value="${c.city}">${c.city}</option>
                                    </c:forEach>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>公司电话:<input type="text" name="companytel" id="companytel"></td>
                            <td class="tab-2">
                                区:
                                <select name="area" id="area">
                                    <option value="">-请选择-</option>
                                    <c:forEach items="${hatAreas}" var="a">
                                        <option value="${a.area}">${a.area}</option>
                                    </c:forEach>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>公司地址:<input type="text" name="companyaddress" id="companyaddress"></td>
                        </tr>
                        <tr>
                            <td>备注:<textarea rows="1" cols="50" name="memo" id="memo"></textarea></td>
                        </tr>
                </table>

            <div style="margin:20px 7px"><a href="javaScript:void(0)" id="tianjia" style="color:black;font-size:18px;text-decoration:none;">添加联系人</a></div>
            
            <div id="sec-tab-3">
                <ul id="tab-3-u" style="position:relative;top:-18px;">
                    <li>姓名</li>
                    <li>电话</li>
                    <li>传真</li>
                    <li>邮箱</li>
                    <li>职务</li>
                    <%--<li>操作</li>--%>
                </ul>
                <%--<ul class="tab-3-ul">--%>
                    <%--1:--%>
                    <%--<li><input type="hidden" name="customid" class="customid"></li>--%>
                    <%--<li><input type="text" name="contactname" class="contactname"></li>--%>
                    <%--<li><input type="text" name="contacttel" class="contacttel"></li>--%>
                    <%--<li><input type="text" name="contactfax" class="contactfax"></li>--%>
                    <%--<li><input type="text" name="contactemail" class="contactemail"></li>--%>
                    <%--<li><input type="text" name="contactrole" class="contactrole"></li>--%>
                <%--</ul>--%>
            </div>

            <%--提交按钮--%>
            <p id="sub">
                <img id="submit" name="submit" src="../../static/images/新增客户/u59.png">
                <img id="returnCustomsMag" src="../../static/images/新增客户/u57.png" onclick="returnCustomsMag()" />
                <%--隐藏的重置键--%>
                <input style="display:none" type="reset" name="reset" id="CZ">
            </p>

        </form>
    </div>


</section>

</div>

</body>
<script>
    function returnCustomsMag() {
        location.href = "${pageContext.request.contextPath}/addCustomsReturnCustomsMag";
    }

    var i = 0;
    $("#tianjia").click(function () {
        i++;
        var ren = "<ul class=\"tab-3-ul\" style=\"position:relative;top:-16px;\">\n" +
            i+":\n" +
            "<li><input type=\"hidden\" name=\"customid\" class=\"customid\"></li>\n" +
            "<li><input type=\"text\" name=\"contactname\" class=\"contactname\"></li>\n" +
            "<li><input type=\"text\" name=\"contacttel\" class=\"contacttel\"></li>\n" +
            "<li><input type=\"text\" name=\"contactfax\" class=\"contactfax\"></li>\n" +
            "<li><input type=\"text\" name=\"contactemail\" class=\"contactemail\"></li>\n" +
            "<li><input type=\"text\" name=\"contactrole\" class=\"contactrole\"></li>\n" +
            "</ul>";

        $("#sec-tab-3").append(ren);
    })
</script>
</html>
